import request from '@/utils/request'

export function getOrderList(params) {
  return request({
    url: '/order/list',
    method: 'get',
    params
  })
}

export function getOrderDetail(id) {
  return request({
    url: `/order/${id}`,
    method: 'get'
  })
}

export function deliverOrder(id) {
  return request({
    url: `/order/${id}/deliver`,
    method: 'put'
  })
}

export function refundOrder(id) {
  return request({
    url: `/order/${id}/refund/confirm`,
    method: 'put'
  })
}

export function batchDeliverOrder(ids) {
  return request({
    url: '/order/update',
    method: 'post',
    data: { ids }
  })
} 